In [6]:
using FileIO, LibSndFile, SampledSignals
include("/Users/marui/Dropbox/_julia/audioutil.jl");
In [7]:
filename = "guitar.flac";
snd = load(filename)
Out[7]:

SampleBuf display requires javascript

To enable for the whole notebook select "Trust Notebook" from the "File" menu. You can also trust this cell by re-running it. You may also need to re-run `using SampledSignals` if the module is not yet loaded in the Julia kernel, or `SampledSignals.embed_javascript()` if the Julia module is loaded but the javascript isn't initialized.

In [8]:
x = snd.data[:,1];
fs = snd.samplerate;
y = freeze(x);
In [9]:
snd_out = SampleBuf(map(PCM16Sample, normalize_signal(y)), fs)
Out[9]:

SampleBuf display requires javascript

To enable for the whole notebook select "Trust Notebook" from the "File" menu. You can also trust this cell by re-running it. You may also need to re-run `using SampledSignals` if the module is not yet loaded in the Julia kernel, or `SampledSignals.embed_javascript()` if the Julia module is loaded but the javascript isn't initialized.

In [10]:
save("freeze_music_output.flac", snd_out);